\(\int \frac {a+c x^4}{d+e x^2} \, dx\) [124]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 55 \[ \int \frac {a+c x^4}{d+e x^2} \, dx=-\frac {c d x}{e^2}+\frac {c x^3}{3 e}+\frac {\left (c d^2+a e^2\right ) \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} e^{5/2}} \]

[Out]

-c*d*x/e^2+1/3*c*x^3/e+(a*e^2+c*d^2)*arctan(x*e^(1/2)/d^(1/2))/e^(5/2)/d^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {1168, 211} \[ \int \frac {a+c x^4}{d+e x^2} \, dx=\frac {\left (a e^2+c d^2\right ) \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} e^{5/2}}-\frac {c d x}{e^2}+\frac {c x^3}{3 e} \]

[In]

Int[(a + c*x^4)/(d + e*x^2),x]

[Out]

-((c*d*x)/e^2) + (c*x^3)/(3*e) + ((c*d^2 + a*e^2)*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*e^(5/2))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1168

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^2)^q*(a
 + c*x^4)^p, x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {c d}{e^2}+\frac {c x^2}{e}+\frac {c d^2+a e^2}{e^2 \left (d+e x^2\right )}\right ) \, dx \\ & = -\frac {c d x}{e^2}+\frac {c x^3}{3 e}+\left (a+\frac {c d^2}{e^2}\right ) \int \frac {1}{d+e x^2} \, dx \\ & = -\frac {c d x}{e^2}+\frac {c x^3}{3 e}+\frac {\left (c d^2+a e^2\right ) \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} e^{5/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00 \[ \int \frac {a+c x^4}{d+e x^2} \, dx=-\frac {c d x}{e^2}+\frac {c x^3}{3 e}+\frac {\left (c d^2+a e^2\right ) \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} e^{5/2}} \]

[In]

Integrate[(a + c*x^4)/(d + e*x^2),x]

[Out]

-((c*d*x)/e^2) + (c*x^3)/(3*e) + ((c*d^2 + a*e^2)*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*e^(5/2))

Maple [A] (verified)

Time = 0.22 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.85

method result size
default \(-\frac {c \left (-\frac {1}{3} e \,x^{3}+d x \right )}{e^{2}}+\frac {\left (a \,e^{2}+c \,d^{2}\right ) \arctan \left (\frac {e x}{\sqrt {e d}}\right )}{e^{2} \sqrt {e d}}\) \(47\)
risch \(\frac {c \,x^{3}}{3 e}-\frac {c d x}{e^{2}}-\frac {\ln \left (e x +\sqrt {-e d}\right ) a}{2 \sqrt {-e d}}-\frac {\ln \left (e x +\sqrt {-e d}\right ) c \,d^{2}}{2 e^{2} \sqrt {-e d}}+\frac {\ln \left (-e x +\sqrt {-e d}\right ) a}{2 \sqrt {-e d}}+\frac {\ln \left (-e x +\sqrt {-e d}\right ) c \,d^{2}}{2 e^{2} \sqrt {-e d}}\) \(113\)

[In]

int((c*x^4+a)/(e*x^2+d),x,method=_RETURNVERBOSE)

[Out]

-c/e^2*(-1/3*e*x^3+d*x)+(a*e^2+c*d^2)/e^2/(e*d)^(1/2)*arctan(e*x/(e*d)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 131, normalized size of antiderivative = 2.38 \[ \int \frac {a+c x^4}{d+e x^2} \, dx=\left [\frac {2 \, c d e^{2} x^{3} - 6 \, c d^{2} e x - 3 \, {\left (c d^{2} + a e^{2}\right )} \sqrt {-d e} \log \left (\frac {e x^{2} - 2 \, \sqrt {-d e} x - d}{e x^{2} + d}\right )}{6 \, d e^{3}}, \frac {c d e^{2} x^{3} - 3 \, c d^{2} e x + 3 \, {\left (c d^{2} + a e^{2}\right )} \sqrt {d e} \arctan \left (\frac {\sqrt {d e} x}{d}\right )}{3 \, d e^{3}}\right ] \]

[In]

integrate((c*x^4+a)/(e*x^2+d),x, algorithm="fricas")

[Out]

[1/6*(2*c*d*e^2*x^3 - 6*c*d^2*e*x - 3*(c*d^2 + a*e^2)*sqrt(-d*e)*log((e*x^2 - 2*sqrt(-d*e)*x - d)/(e*x^2 + d))
)/(d*e^3), 1/3*(c*d*e^2*x^3 - 3*c*d^2*e*x + 3*(c*d^2 + a*e^2)*sqrt(d*e)*arctan(sqrt(d*e)*x/d))/(d*e^3)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 104 vs. \(2 (49) = 98\).

Time = 0.14 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.89 \[ \int \frac {a+c x^4}{d+e x^2} \, dx=- \frac {c d x}{e^{2}} + \frac {c x^{3}}{3 e} - \frac {\sqrt {- \frac {1}{d e^{5}}} \left (a e^{2} + c d^{2}\right ) \log {\left (- d e^{2} \sqrt {- \frac {1}{d e^{5}}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{d e^{5}}} \left (a e^{2} + c d^{2}\right ) \log {\left (d e^{2} \sqrt {- \frac {1}{d e^{5}}} + x \right )}}{2} \]

[In]

integrate((c*x**4+a)/(e*x**2+d),x)

[Out]

-c*d*x/e**2 + c*x**3/(3*e) - sqrt(-1/(d*e**5))*(a*e**2 + c*d**2)*log(-d*e**2*sqrt(-1/(d*e**5)) + x)/2 + sqrt(-
1/(d*e**5))*(a*e**2 + c*d**2)*log(d*e**2*sqrt(-1/(d*e**5)) + x)/2

Maxima [F(-2)]

Exception generated. \[ \int \frac {a+c x^4}{d+e x^2} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((c*x^4+a)/(e*x^2+d),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more
details)Is e

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.91 \[ \int \frac {a+c x^4}{d+e x^2} \, dx=\frac {{\left (c d^{2} + a e^{2}\right )} \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{\sqrt {d e} e^{2}} + \frac {c e^{2} x^{3} - 3 \, c d e x}{3 \, e^{3}} \]

[In]

integrate((c*x^4+a)/(e*x^2+d),x, algorithm="giac")

[Out]

(c*d^2 + a*e^2)*arctan(e*x/sqrt(d*e))/(sqrt(d*e)*e^2) + 1/3*(c*e^2*x^3 - 3*c*d*e*x)/e^3

Mupad [B] (verification not implemented)

Time = 14.26 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.82 \[ \int \frac {a+c x^4}{d+e x^2} \, dx=\frac {c\,x^3}{3\,e}+\frac {\mathrm {atan}\left (\frac {\sqrt {e}\,x}{\sqrt {d}}\right )\,\left (c\,d^2+a\,e^2\right )}{\sqrt {d}\,e^{5/2}}-\frac {c\,d\,x}{e^2} \]

[In]

int((a + c*x^4)/(d + e*x^2),x)

[Out]

(c*x^3)/(3*e) + (atan((e^(1/2)*x)/d^(1/2))*(a*e^2 + c*d^2))/(d^(1/2)*e^(5/2)) - (c*d*x)/e^2